﻿using CID.Domain.Audit;
using CID.Domain.Development;
using CID.Domain.Operations;
using CID.Domain.Users;

namespace CID.Domain.Persistence.Mappings.Audit
{
    public class ReleaseDeploymentLogMap : EntityMap<ReleaseDeploymentLog>
    {
        public ReleaseDeploymentLogMap() : base() 
        {
            Map(x => x.DeploymentUniqueIdentifier).Not.Nullable();
            Map(x => x.Details);
            Map(x => x.StartTimestamp);
            Map(x => x.EndTimestamp);
            Map(x => x.Status);
            References<Environment>(x => x.Environment);
            References<Release>(x => x.Release);
            References<User>(x => x.Responsible);
            HasMany<VersionDeploymentLog>(x => x.Versions);
        }
    }
}
